import request from '@/utils/request'

export function listServer(query) {
  return request({
    url: '/server/server/list',
    method: 'get',
    params: query
  })
}

export function getServer(postId) {
  return request({
    url: '/server/server/' + postId,
    method: 'get'
  })
}

export function addServer(data) {
  return request({
    url: '/server/server',
    method: 'post',
    data: data
  })
}

export function updateServer(data) {
  return request({
    url: '/server/server',
    method: 'put',
    data: data
  })
}

export function delServer(postId) {
  return request({
    url: '/server/server/' + postId,
    method: 'delete'
  })
}
